﻿#region Using declarations
using System;
using System.ComponentModel;
using System.Drawing;
using System.Globalization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Indicator;
using NinjaTrader.Strategy;
#endregion

// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
    partial class Strategy
    {
        ///Returns the current chart background color
        public int GetBackgroundColor()
        {
            int result = -1;
            if (BackColorAll == Color.Black)
                result = 1;
            if (BackColorAll == Color.Blue)
                result = 2;
            if (BackColorAll == Color.Cyan)
                result = 3;
            if (BackColorAll == Color.Green)
                result = 4;
            if (BackColorAll == Color.Magenta)
                result = 5;
            if (BackColorAll == Color.Red)
                result = 6;
            if (BackColorAll == Color.Yellow)
                result = 7;
            if (BackColorAll == Color.White)
                result = 8;
            if (BackColorAll == Color.DarkBlue)
                result = 9;
            if (BackColorAll == Color.DarkCyan)
                result = 10;
            if (BackColorAll == Color.DarkGreen)
                result = 11;
            if (BackColorAll == Color.DarkMagenta)
                result = 12;
            if (BackColorAll == Color.DarkRed)
                result = 13;
            if (BackColorAll == Color.Brown)
                result = 14;
            if (BackColorAll == Color.DarkGray)
                result = 15;
            if (BackColorAll == Color.LightGray)
                result = 16;

            return result;
        }

    }
}
